%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for mutations/v4/b.list_bde_mutation"
    Bucket0("Bucket 0 (root)"):::bucket
    Bucket1("Bucket 1 (mutationField)<br />Deps: 15, 16, 22<br /><br />1: PgSelect[12]<br />2: PgSelectRows[18]<br />ᐳ: 17, 19, 20, 21"):::bucket
    Bucket2("Bucket 2 (mutationField)<br />Deps: 38, 2, 27, 76, 77<br /><br />1: Access[29]<br />2: Access[30]<br />3: Object[31]<br />4: PgFromExpression[32]<br />5: PgSelect[28]<br />6: PgSelectRows[34]<br />ᐳ: 33, 35, 36, 37"):::bucket
    Bucket3("Bucket 3 (mutationField)<br />Deps: 54, 2, 43, 78, 79<br /><br />1: Access[45]<br />2: Access[46]<br />3: Object[47]<br />4: PgFromExpression[48]<br />5: PgSelect[44]<br />6: PgSelectRows[50]<br />ᐳ: 49, 51, 52, 53"):::bucket
    Bucket4("Bucket 4 (mutationField)<br />Deps: 69, 2, 58, 76, 80<br /><br />1: Access[60]<br />2: Access[61]<br />3: Object[62]<br />4: PgFromExpression[63]<br />5: PgSelect[59]<br />6: PgSelectRows[65]<br />ᐳ: 64, 66, 67, 68"):::bucket
    Bucket5("Bucket 5 (nullableBoundary)<br />Deps: 21, 20<br /><br />ROOT Object{1}ᐸ{result}ᐳ[21]"):::bucket
    Bucket6("Bucket 6 (nullableBoundary)<br />Deps: 37, 36<br /><br />ROOT Object{2}ᐸ{result}ᐳ[37]"):::bucket
    Bucket7("Bucket 7 (nullableBoundary)<br />Deps: 53, 52<br /><br />ROOT Object{3}ᐸ{result}ᐳ[53]"):::bucket
    Bucket8("Bucket 8 (nullableBoundary)<br />Deps: 68, 67<br /><br />ROOT Object{4}ᐸ{result}ᐳ[68]"):::bucket
    Bucket9("Bucket 9 (listItem)<br /><br />ROOT __Item{9}ᐸ20ᐳ[70]"):::bucket
    Bucket10("Bucket 10 (listItem)<br /><br />ROOT __Item{10}ᐸ36ᐳ[71]"):::bucket
    Bucket11("Bucket 11 (listItem)<br /><br />ROOT __Item{11}ᐸ52ᐳ[72]"):::bucket
    Bucket12("Bucket 12 (listItem)<br /><br />ROOT __Item{12}ᐸ67ᐳ[73]"):::bucket
    end
    Bucket0 --> Bucket1 & Bucket2 & Bucket3 & Bucket4
    Bucket1 --> Bucket5
    Bucket2 --> Bucket6
    Bucket3 --> Bucket7
    Bucket4 --> Bucket8
    Bucket5 --> Bucket9
    Bucket6 --> Bucket10
    Bucket7 --> Bucket11
    Bucket8 --> Bucket12

    %% plan dependencies
    __InputObject6{{"__InputObject[6∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]<br />- Constantᐸ[]ᐳ[8]<br />- Constantᐸ'bar'ᐳ[74]<br />- Constantᐸ'q0'ᐳ[75]"}}:::plan
    __InputObject23{{"__InputObject[23∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]<br />- Constantᐸ[ 'option-1' ]ᐳ[24]<br />- Constantᐸ''ᐳ[76]<br />- Constantᐸ'q1'ᐳ[77]"}}:::plan
    __InputObject39{{"__InputObject[39∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]<br />- Constantᐸ[]ᐳ[40]<br />- Constantᐸ'foo'ᐳ[78]<br />- Constantᐸ'q2'ᐳ[79]"}}:::plan
    __InputObject55{{"__InputObject[55∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]<br />- Constantᐸ[ 'option-2' ]ᐳ[56]<br />- Constantᐸ''ᐳ[76]<br />- Constantᐸ'q3'ᐳ[80]"}}:::plan
    PgFromExpression16{{"PgFromExpression[16∈0] ➊<br />More deps:<br />- Constantᐸ'bar'ᐳ[74]<br />- Constantᐸ'q0'ᐳ[75]"}}:::plan
    BakedInput11{{"BakedInput[11∈0] ➊<br />More deps:<br />- Constantᐸ[]ᐳ[8]"}}:::plan
    BakedInput11 --> PgFromExpression16
    Object15{{"Object[15∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access13{{"Access[13∈0] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access14{{"Access[14∈0] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access13 & Access14 --> Object15
    ApplyInput22{{"ApplyInput[22∈0] ➊"}}:::plan
    __InputObject6 --> ApplyInput22
    BakedInput27{{"BakedInput[27∈0] ➊<br />More deps:<br />- Constantᐸ[ 'option-1' ]ᐳ[24]"}}:::plan
    ApplyInput38{{"ApplyInput[38∈0] ➊"}}:::plan
    __InputObject23 --> ApplyInput38
    BakedInput43{{"BakedInput[43∈0] ➊<br />More deps:<br />- Constantᐸ[]ᐳ[40]"}}:::plan
    ApplyInput54{{"ApplyInput[54∈0] ➊"}}:::plan
    __InputObject39 --> ApplyInput54
    BakedInput58{{"BakedInput[58∈0] ➊<br />More deps:<br />- Constantᐸ[ 'option-2' ]ᐳ[56]"}}:::plan
    ApplyInput69{{"ApplyInput[69∈0] ➊"}}:::plan
    __InputObject55 --> ApplyInput69
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ<br />Dependents: 8"]:::plan
    PgSelect12[["PgSelect[12∈1] ➊<br />ᐸlist_bde_mutation(mutation)ᐳ"]]:::sideeffectplan
    Object15 & PgFromExpression16 & ApplyInput22 --> PgSelect12
    First17{{"First[17∈1] ➊"}}:::plan
    PgSelectRows18[["PgSelectRows[18∈1] ➊"]]:::plan
    PgSelectRows18 --> First17
    PgSelect12 --> PgSelectRows18
    PgSelectSingle19{{"PgSelectSingle[19∈1] ➊<br />ᐸlist_bde_mutationᐳ"}}:::plan
    First17 --> PgSelectSingle19
    PgClassExpression20{{"PgClassExpression[20∈1] ➊<br />ᐸ__list_bde_mutation__.vᐳ"}}:::plan
    PgSelectSingle19 --> PgClassExpression20
    Object21{{"Object[21∈1] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgClassExpression20 --> Object21
    PgSelect28[["PgSelect[28∈2] ➊<br />ᐸlist_bde_mutation(mutation)ᐳ"]]:::sideeffectplan
    Object31{{"Object[31∈2] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    PgFromExpression32{{"PgFromExpression[32∈2] ➊<br />More deps:<br />- Constantᐸ''ᐳ[76]<br />- Constantᐸ'q1'ᐳ[77]"}}:::plan
    Object31 & PgFromExpression32 & ApplyInput38 --> PgSelect28
    BakedInput27 --> PgFromExpression32
    Access29{{"Access[29∈2] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access30{{"Access[30∈2] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access29 & Access30 --> Object31
    First33{{"First[33∈2] ➊"}}:::plan
    PgSelectRows34[["PgSelectRows[34∈2] ➊"]]:::plan
    PgSelectRows34 --> First33
    PgSelect28 --> PgSelectRows34
    PgSelectSingle35{{"PgSelectSingle[35∈2] ➊<br />ᐸlist_bde_mutationᐳ"}}:::plan
    First33 --> PgSelectSingle35
    PgClassExpression36{{"PgClassExpression[36∈2] ➊<br />ᐸ__list_bde_mutation__.vᐳ"}}:::plan
    PgSelectSingle35 --> PgClassExpression36
    Object37{{"Object[37∈2] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgClassExpression36 --> Object37
    PgSelect44[["PgSelect[44∈3] ➊<br />ᐸlist_bde_mutation(mutation)ᐳ"]]:::sideeffectplan
    Object47{{"Object[47∈3] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    PgFromExpression48{{"PgFromExpression[48∈3] ➊<br />More deps:<br />- Constantᐸ'foo'ᐳ[78]<br />- Constantᐸ'q2'ᐳ[79]"}}:::plan
    Object47 & PgFromExpression48 & ApplyInput54 --> PgSelect44
    BakedInput43 --> PgFromExpression48
    Access45{{"Access[45∈3] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access46{{"Access[46∈3] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access45 & Access46 --> Object47
    First49{{"First[49∈3] ➊"}}:::plan
    PgSelectRows50[["PgSelectRows[50∈3] ➊"]]:::plan
    PgSelectRows50 --> First49
    PgSelect44 --> PgSelectRows50
    PgSelectSingle51{{"PgSelectSingle[51∈3] ➊<br />ᐸlist_bde_mutationᐳ"}}:::plan
    First49 --> PgSelectSingle51
    PgClassExpression52{{"PgClassExpression[52∈3] ➊<br />ᐸ__list_bde_mutation__.vᐳ"}}:::plan
    PgSelectSingle51 --> PgClassExpression52
    Object53{{"Object[53∈3] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgClassExpression52 --> Object53
    PgSelect59[["PgSelect[59∈4] ➊<br />ᐸlist_bde_mutation(mutation)ᐳ"]]:::sideeffectplan
    Object62{{"Object[62∈4] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    PgFromExpression63{{"PgFromExpression[63∈4] ➊<br />More deps:<br />- Constantᐸ''ᐳ[76]<br />- Constantᐸ'q3'ᐳ[80]"}}:::plan
    Object62 & PgFromExpression63 & ApplyInput69 --> PgSelect59
    BakedInput58 --> PgFromExpression63
    Access60{{"Access[60∈4] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access61{{"Access[61∈4] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access60 & Access61 --> Object62
    First64{{"First[64∈4] ➊"}}:::plan
    PgSelectRows65[["PgSelectRows[65∈4] ➊"]]:::plan
    PgSelectRows65 --> First64
    PgSelect59 --> PgSelectRows65
    PgSelectSingle66{{"PgSelectSingle[66∈4] ➊<br />ᐸlist_bde_mutationᐳ"}}:::plan
    First64 --> PgSelectSingle66
    PgClassExpression67{{"PgClassExpression[67∈4] ➊<br />ᐸ__list_bde_mutation__.vᐳ"}}:::plan
    PgSelectSingle66 --> PgClassExpression67
    Object68{{"Object[68∈4] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgClassExpression67 --> Object68
    __Item70[/"__Item[70∈9]<br />ᐸ20ᐳ"\]:::itemplan
    PgClassExpression20 ==> __Item70
    __Item71[/"__Item[71∈10]<br />ᐸ36ᐳ"\]:::itemplan
    PgClassExpression36 ==> __Item71
    __Item72[/"__Item[72∈11]<br />ᐸ52ᐳ"\]:::itemplan
    PgClassExpression52 ==> __Item72
    __Item73[/"__Item[73∈12]<br />ᐸ67ᐳ"\]:::itemplan
    PgClassExpression67 ==> __Item73

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,__InputObject6,BakedInput11,Access13,Access14,Object15,PgFromExpression16,ApplyInput22,__InputObject23,BakedInput27,ApplyInput38,__InputObject39,BakedInput43,ApplyInput54,__InputObject55,BakedInput58,ApplyInput69 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgSelect12,First17,PgSelectRows18,PgSelectSingle19,PgClassExpression20,Object21 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2,PgSelect28,Access29,Access30,Object31,PgFromExpression32,First33,PgSelectRows34,PgSelectSingle35,PgClassExpression36,Object37 bucket2
    classDef bucket3 stroke:#ffa500
    class Bucket3,PgSelect44,Access45,Access46,Object47,PgFromExpression48,First49,PgSelectRows50,PgSelectSingle51,PgClassExpression52,Object53 bucket3
    classDef bucket4 stroke:#0000ff
    class Bucket4,PgSelect59,Access60,Access61,Object62,PgFromExpression63,First64,PgSelectRows65,PgSelectSingle66,PgClassExpression67,Object68 bucket4
    classDef bucket5 stroke:#7fff00
    class Bucket5 bucket5
    classDef bucket6 stroke:#ff1493
    class Bucket6 bucket6
    classDef bucket7 stroke:#808000
    class Bucket7 bucket7
    classDef bucket8 stroke:#dda0dd
    class Bucket8 bucket8
    classDef bucket9 stroke:#ff0000
    class Bucket9,__Item70 bucket9
    classDef bucket10 stroke:#ffff00
    class Bucket10,__Item71 bucket10
    classDef bucket11 stroke:#00ffff
    class Bucket11,__Item72 bucket11
    classDef bucket12 stroke:#4169e1
    class Bucket12,__Item73 bucket12

